1. Field of the Invention
The invention relates in general to an image refreshing method and associated image processing apparatus, and more particularly, to an image refreshing method and associated image processing apparatus capable of determining a refresh starting location or sequence of a frame on a panel according to a location of an updating part of the frame.
2. Description of the Related Art
In a conventional image processing apparatus, a complete process to display a frame on a panel includes writing the frame into a storage device, reading the frame from the storage device and displaying the frame on the panel. Writing the frame into the storage device is also referred to as “updating the frame in the storage device”, and displaying the frame on the panel is also referred to as “refreshing the frame on the panel”. Theoretically, reading and refreshing the frame shall be performed nearly synchronously. However, an operation unit for writing the frame into the storage device and an operation unit for reading the frame from the storage device are usually unsynchronized. Moreover, a writing speed for writing the frame into the storage device and a reading speed for reading the frame from the storage device are different and do not necessarily cooperate with each other. In general, the panel successively displays a plurality of frames, meaning that the image processing device needs to consecutively write and read different frames in an uninterrupted manner. In an event that a relation between writing frames into the storage device and reading frames from the storage device is not appropriately adjusted and maintained, e.g., a frame is being written into the storage device while another frame is being read from the storage device, a new frame and an old frame may occasionally overlap to show an incomplete image on the panel—such an effect is called a tearing effect.
FIG. 1(a) shows a schematic diagram of a tearing effect caused by a conventional image processing apparatus. In the diagram, “write 0” means writing a frame 0 into a storage device, and “read 0” means reading the frame 0 from the storage device. Similarly, “write 1” means writing a frame 1 into the storage device, and “read 1” means reading the frame 1 from the storage device. As shown in FIG. 1(a), “read 1” and “write 2” do not intersect, indicating that “read 1” and “write 2” do not interfere each other. However, “read 0” and “write 1” do intersect, indicating operations of reading the frame 0 and writing the frame 1 at some point are performed simultaneously to possibly lead to a tearing effect on the panel. Furthermore, Y-axis scales in FIG. 1(a) also correspond to different locations in the frame and are directional. For example, when “read 0%” is defined corresponding to an upper-left corner of a frame and “read 100%” is defined corresponding to a lower-right corner of the frame, the frame is read from data of the upper-left corner to data of the lower-right corner. That is to say, when refreshing the frame, the frame is refreshed from the upper-left corner to the lower-right corner of the panel, as shown in FIG. 1(b). Thus, the intersection formed by “read 0” and “write 1” means that reading the frame 0 from the storage device and writing the frame 1 into the storage device are at a certain point simultaneously performed at a same location of the storage device, resulting in the tearing effect. Similarly, FIG. 1(c) shows a frame being refreshed from the upper-right corner to the lower-left corner.
A “partial refresh” may be performed when refreshing a frame. When the majorities of images of two adjacent frames are identical, that is, only small parts of the images are different, the partial refresh is performed. At this point, only data of a part of the frame, instead of data of the entire frame, needs to be written, i.e., only an updating part of the frame being written is written. Taking FIG. 2 for example, dotted lines of “write 0 to 3” denote non-updating parts, whereas solid lines denote updating parts. Therefore, the tearing effect does not occur if “read 0 to 2” and “write 0 to 3” intersect at the dotted lines, e.g., “read 2” and “write 3”. In contrast, the tearing effect nevertheless occurs if the intersection takes places at the solid lines, e.g., “read 0” and “write 1”. It should be noted that, the tearing effect takes place not only when a previous frame is read too slowly (e.g., “read 0” in FIG. 1 and FIG. 2 is read too slowly, and thus intersects “write 1” of a next frame) but also when a same frame is written too slowly. For example, “write 4” in FIG. 3 is written too slowly and thus intersects “read 4” to lead to the tearing effect.
Therefore, there is a need for a mechanism that provides a solution for preventing the issue of tearing effect during frame refresh.